<?xml version="1.0" encoding="utf-8"?>
<Content type="xform" name="EditContent">
	<model>
		<instance>
			<provider name="SagePayV3" validGroups="all">
				<description value="Pay by Credit Card (SagePayV3)"/>
				<currency value="GBP"/>
        <cardsAccepted value="MasterCard:MC,VISA:VISA,Delta:DELTA,Solo:SOLO,Switch/Maestro:MAESTRO" />
				<accountId value="testvendor"/>
				<accountPassword value="testVendor"/>
				<opperationMode value="test"/>
				<transactionType value="DEFFERED"/>
				<validateAddress value="on"/>
				<validateCV2 value="on"/>
				<failOn value="NO DATA MATCHES"/>
				<secure3d value="off"/>
			</provider>
		</instance>
		<submission id="EditContent" action="" method="post" event="return form_check(this)"/>
		<bind nodeset="provider">
			<bind id="description" nodeset="description/@value" required="true()" type="string"/>
			<bind id="accountId" nodeset="accountId/@value" required="true()" type="string"/>
			<bind id="opperationMode" nodeset="opperationMode/@value" required="true()" type="string"/>
			<bind id="currency" nodeset="currency/@value" required="true()" type="string"/>
			<bind id="cardsAccepted" nodeset="cardsAccepted/@value" required="true()" type="string"/>
			<bind id="transactionType" nodeset="transactionType/@value" required="true()" type="string"/>
			<bind id="validateAddress" nodeset="validateAddress/@value" required="true()" type="string"/>
			<bind id="validateCV2" nodeset="validateCV2/@value" required="true()" type="string"/>
			<bind id="secure3d" nodeset="secure3d/@value" required="true()" type="string"/>
		</bind>
	</model>
	<group ref="EditContent">
		<label>SagePay V3 Settings</label>
    <hint>To sign up for a Sagepay account <a href="https://applications.sagepay.com/apply/C1B0075E-F99D-4E5D-8AE0-E66F13FD081E">click here</a></hint>
    <input bind="description">
			<label>Description</label>
		</input>
		<input bind="accountId">
			<label>Account Id</label>
		</input>
    <select1 bind="currency" appearance="full" class="required">
      <label>Currency</label>
      <item>
        <label>GBP</label>
        <value>GBP</value>
      </item>
      <item>
        <label>EUR</label>
        <value>EUR</value>
      </item>
      <item>
        <label>USD</label>
        <value>USD</value>
      </item>
    </select1>
		<textarea bind="cardsAccepted" cols="120" rows="5">
			<label>CardsAccepted</label>
		</textarea>
		<select1 bind="opperationMode" appearance="full" class="required">
			<label>Opperation Mode</label>
			<item>
				<label>Live</label>
				<value>live</value>
			</item>
			<item>
				<label>Test</label>
				<value>test</value>
			</item>
		</select1>
		<select1 bind="transactionType" appearance="full" class="required">
			<label>Transaction Type</label>
			<item>
				<label>Payment</label>
				<value>PAYMENT</value>
			</item>
			<item>
				<label>Defered</label>
				<value>DEFERRED</value>
			</item>
			<item>
				<label>PreAuth</label>
				<value>AUTHENTICATE</value>
			</item>
		</select1>
		<select1 bind="validateAddress" appearance="full" class="required">
			<label>Validate Address</label>
			<item>
				<label>Yes</label>
				<value>on</value>
			</item>
			<item>
				<label>No</label>
				<value>off</value>
			</item>
		</select1>
		<select1 bind="validateCV2" appearance="full" class="required">
			<label>Validate CV2</label>
			<item>
				<label>
          If AVS/CV2 enabled then check them. If rules
          apply, use rules (default)
        </label>
				<value>0</value>
			</item>
			<item>
				<label>
          Force AVS/CV2 checks even if not enabled for the
          account. If rules apply, use rules.
        </label>
				<value>1</value>
			</item>
      <item>
        <label>
          Force NO AVS/CV2 checks even if enabled on
          account
        </label>
        <value>2</value>
      </item>
      <item>
        <label>
          Force AVS/CV2 checks even if not enabled for the
          account but DON’T apply any rules.
        </label>
        <value>3</value>
      </item>
		</select1>
		<select1 bind="secure3d" appearance="full" class="required">
			<label>3D Secure</label>
			<item>
				<label>
          If 3D-Secure checks are possible and rules allow,
          perform the checks and apply the authorisation rules.
          (default)
        </label>
				<value>0</value>
			</item>
			<item>
				<label>
          Force 3D-Secure checks for this transaction if
          possible and apply rules for authorisation.
        </label>
				<value>1</value>
			</item>
      <item>
        <label>
          Do not perform 3D-Secure checks for this
          transaction and always authorise.
        </label>
        <value>2</value>
      </item>
      <item>
        <label>
          Force 3D-Secure checks for this transaction if
          possible but ALWAYS obtain an auth code, irrespective
          of rule base.
        </label>
        <value>3</value>
      </item>
		</select1>
		<submit submission="" ref="ewSubmit" class="principle">
			<label>Save Settings</label>
		</submit>
	</group>
</Content>
